//go:build arm64

package parsers

var (
	// from arm64/include/uapi/asm/fcntl.h
	// NOT sequential values
	// gap
	O_DIRECTORY = SystemFunctionArgument{rawValue: 040000, stringValue: "O_DIRECTORY"}
	O_NOFOLLOW  = SystemFunctionArgument{rawValue: 0100000, stringValue: "O_NOFOLLOW"}
	O_DIRECT    = SystemFunctionArgument{rawValue: 0200000, stringValue: "O_DIRECT"}
	O_LARGEFILE = SystemFunctionArgument{rawValue: 0400000, stringValue: "O_LARGEFILE"}
)

var openFlagsValues = []SystemFunctionArgument{
	// O_ACCMODE, // macro for access mode, so not included

	// special cases checked before the loop in ParseOpenFlagArgument
	// O_RDONLY,
	// O_WRONLY,
	// O_RDWR,
	O_CREAT,
	O_EXCL,
	O_NOCTTY,
	O_TRUNC,
	O_APPEND,
	O_NONBLOCK,
	O_DSYNC,
	O_SYNC,
	FASYNC,
	O_LARGEFILE,
	O_DIRECTORY,
	O_NOFOLLOW,
	O_DIRECT,
	O_NOATIME,
	O_CLOEXEC,
	O_PATH,
	O_TMPFILE,
}

var (
	// from linux/ptrace.h and sys/ptrace.h
	// NOT sequential values
	// gap
	PTRACE_PEEKMTETAGS = SystemFunctionArgument{rawValue: 33, stringValue: "PTRACE_PEEKMTETAGS"}
	PTRACE_POKEMTETAGS = SystemFunctionArgument{rawValue: 34, stringValue: "PTRACE_POKEMTETAGS"}
)

var ptraceRequestValues = []SystemFunctionArgument{
	PTRACE_TRACEME,
	PTRACE_PEEKTEXT,
	PTRACE_PEEKDATA,
	PTRACE_PEEKUSR,
	PTRACE_POKETEXT,
	PTRACE_POKEDATA,
	PTRACE_POKEUSR,
	PTRACE_CONT,
	PTRACE_KILL,
	PTRACE_SINGLESTEP,
	// PTRACE_GETREGS,
	// PTRACE_SETREGS,
	// PTRACE_GETFPREGS,
	// PTRACE_SETFPREGS,
	PTRACE_ATTACH,
	PTRACE_DETACH,
	// PTRACE_GETFPXREGS,
	// PTRACE_SETFPXREGS,
	PTRACE_SYSCALL,
	// PTRACE_GET_THREAD_AREA,
	// PTRACE_SET_THREAD_AREA,
	// PTRACE_ARCH_PRCTL,
	PTRACE_SYSEMU,
	PTRACE_SYSEMU_SINGLESTEP,
	// PTRACE_SINGLEBLOCK,
	PTRACE_PEEKMTETAGS,
	PTRACE_POKEMTETAGS,
	PTRACE_SETOPTIONS,
	PTRACE_GETEVENTMSG,
	PTRACE_GETSIGINFO,
	PTRACE_SETSIGINFO,
	PTRACE_GETREGSET,
	PTRACE_SETREGSET,
	PTRACE_SEIZE,
	PTRACE_INTERRUPT,
	PTRACE_LISTEN,
	PTRACE_PEEKSIGINFO,
	PTRACE_GETSIGMASK,
	PTRACE_SETSIGMASK,
	PTRACE_SECCOMP_GET_FILTER,
	PTRACE_SECCOMP_GET_METADATA,
	PTRACE_GET_SYSCALL_INFO,
	PTRACE_GET_RSEQ_CONFIGURATION,
	// PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG,
	// PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG,
}
